using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;
using MIMPGameLibrary;

namespace MIMPWinForms.SpriteDisplays
{
    /// <summary>
    /// Extends SpriteDisplay to hold a reference to a Monster object associated with the SpriteDisplay.
    /// </summary>
    public class MonsterDisplay : SpriteDisplay
    {
        private Monster monster;
        /// <summary>
        /// A reference to the Monster object being displayed.
        /// </summary>
        public Monster Monster {
            get { return monster; }
            set { monster = value; }
        }

        /// <summary>
        /// Constructs a new MonsterDisplay.
        /// </summary>
        /// <param name="monster">The Monser that this MonsterDisplay displays.</param>
        /// <param name="scale">The factor by which to scale the Monster.</param>
        /// <param name="sprite">The Texture2D used to draw the Monster.</param>
        public MonsterDisplay(Monster monster, float scale, Texture2D sprite)
            : base(0, 0, scale, sprite) {
            this.monster = monster;
        }

        /// <summary>
        /// Constructs a new MonsterDisplay.
        /// </summary>
        /// <param name="monster">The Monser that this MonsterDisplay displays.</param>
        /// <param name="sprite">The Texture2D used to draw the Monster.</param>
        public MonsterDisplay(Monster monster, Texture2D sprite)
            : this(monster, 1, sprite) { }

        public override string ToString() {
            return "Monster display for " + monster + "--origin: " + Origin;
        }
    }
}
